using UnityEngine;
using System.Collections;

public class SlabZone : MonoBehaviour
{

	GameManager gameManager;

	void Awake ()
	{
		gameManager = (GameManager)GameObject.Find ("GameManager").GetComponent<GameManager> ();
	}

	// Use this for initialization
	void Start ()
	{
		
	}

	// Update is called once per frame
	void Update ()
	{
		//collider.
	}


	void OnTriggerEnter (Collider other)
	{
		Debug.Log ("Trigger Enter Slab Zone");
		if(other.tag.Equals("slab")) {
			gameManager.slabZoneList.Add(other.gameObject);
		}
		
	}

	void OnTriggerExit (Collider other)
	{
		Debug.Log ("Trigger EXIT Slab Zone");
		if(other.tag.Equals("slab")) {
			gameManager.slabZoneList.Remove(other.gameObject);
		}
	}
	
}
